<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@ include file="/system/include/taglib.jsp"%>
<html>
<head>
<base href="${pageScope.basePath }">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">

<title>中山市中凯信息科技有限公司</title>
<link type="text/css" rel="stylesheet" href="system/css/style.css" />
<link href="system/plugins/validateMyForm/css/plugin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="system/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="system/js/verify1.js"></script>
<script type="text/javascript" src="system/plugins/validateMyForm/js/jquery.validateMyForm.1.5.js"></script>
<script type="text/javascript" language="javascript" src="system/js/public.js"></script>
<script type="text/javascript" language="javascript" src="system/js/jquery.blockUI.js"></script>

<script type="text/javascript">  
 /****************************
 *在FORM提交前判断是否输入了所需数据
 */
 $(document).ready(function(){
 	if ($("input[name='DATACHECK']").val()=='NONE')
 	{
 		$.blockUI({ 
				timeout:	3000,
				message:  '搜索不到任何数据！'
			}); 
 	}
	$("#searchForm").submit(function(){ 
		if (($("input[name='CCPZH']").attr("value") == "")&&($("input[name='CJH']").attr("value") == "")&&($("input[name='CCDJH']").attr("value") == "")&&($("input[name='NSRBM']").attr("value") == ""))
		{
			$.blockUI({ 
				timeout:	3000,
				message:  '请输入除“车船类型”外任何一种或多种搜索条件！'
			}); 
			return false;
		}
	});}); 
</script>
</head>
<body>
<div class="main">
	<div class="position">
		当前位置: <a href="sysadm/desktop.jsp">桌 面</a> → 
		<c:if test="${param.module=='book/car_cancel_form.jsp' }">车船注销</c:if>
		<c:if test="${param.module=='book/car_adjusttax_form.jsp' }">应税年月调整</c:if>  
		<c:if test="${param.module=='book/transforform.jsp' }">车船过户</c:if>
		<c:if test="${param.module=='book/moveoutform.jsp' }">车船迁出</c:if>
		<c:if test="${param.module=='book/insurance_orform.jsp' }">车船保险代缴</c:if>
		<c:if test="${param.module=='book/car_register_update_form.jsp' }">车船修改</c:if>
		<c:if test="${param.module=='declare/declare_check.do' }">车船申报</c:if>
		<c:if test="${param.module=='ticket/ATM_reprint.do' }">自助终端税票补打</c:if>
		<c:if test="${param.module=='ticket/info_without_tax_form.jsp' }">自助终端税票补打</c:if>
	</div>
	<div class="mainbody">
		<div class="operate_info">
			操作说明：<br/>
			<font color="#FF0000"><label id="explaininfo">
			1. 必须输入除“车船类型”外任何一种或多种条件
			</label></font>
		</div>
		<div class="table">
			<form id="searchForm" name="searchForm" action="system/search/unisearch.jsp?module=${param.module }" method="post">

				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_form" style="background-color:#EFEFEF;border:none;border-bottom:2px #D9D9D9 solid;">
					<tr  >
						<td id="errmessage" colspan="6" align="center" style="display:none"><span style="color:red"><h1>请至少输入除“车船类型”外的其中一种条件</h1></span></td>
					</tr>
					<tr>
						<%--车船类型，列表显示--%>
						<td align="right">车船类型：</td>
						<td> 
							<mytag:List name="JJCCLX_DM" table="TDmCcsJjcclx"></mytag:List>
							<select name="JJCCLX_DM">
									<option value="">--请选择--</option>
								<logic:iterate id="ccnx_DM" name="JJCCLX_DM">
									<option value="${ccnx_DM.jjcclxDm }">${ccnx_DM.jjcclxMc }</option>
								</logic:iterate>
							</select>
							<c:if test="${param.CCPZH!=null }">
								<script>
									document.getElementsByTagName("select")[0].value="${param.JJCCLX_DM }";
								</script>
							</c:if> 
						</td>
						<td align="right">车船牌照号：</td>
						<td><input name="CCPZH" <c:if test="${param.CCPZH!=null }">value="${param.CCPZH }"</c:if> onkeyup="uptocase(this)"/></td>
						<td align="right">车架号：</td>
						<td><input name="CJH" <c:if test="${param.CJH!=null }">value="${param.CJH }"</c:if> /></td>
					</tr>
					<tr>
						<td align="right">车船登记号：</td>
						<td><input name="CCDJH" onkeyup="onlydigit(this,11)" <c:if test="${param.CCDJH!=null }">value="${param.CCDJH }"</c:if> /></td>
						<td align="right">单位编码：</td>
						<td><input name="NSRBM" <c:if test="${param.NSRBM!=null }">value="${param.NSRBM }"</c:if> /></td>
						<td colspan="2" class="form_button" style="text-align:center;"><input name="semit" type="submit" value="搜索" /></td>
					</tr>
				</table>
			</form>
			<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_list">
				<tr>
					<th>车船登记号</th>
					<th>车船类型</th>
					<th>车牌号</th>
					<th>车主名称</th>
					<th>车架号</th>
					<th>登记状态</th>
					<th>应税起始年月</th>
					<th>操作</th>
				</tr>
				<%--List标签，查找车船信息，每页显示10条--%>
				<!-- 车船类型是必须要输入的东西 -->
				<mytag:List name="ccxxList" table="TDjCcdjxx" pageMax="15">
					<c:if test="${(param.CCPZH==null || param.CCPZH=='') && (param.CJH==null || param.CJH=='')&&(param.CCDJH==null || param.CCDJH=='')&&(param.NSRBM==null || param.NSRBM=='')}">1=0</c:if>
					<c:if test="${param.JJCCLX_DM=='' }">jjcclxDm like '%'</c:if>
					<c:if test="${param.JJCCLX_DM!=null && param.JJCCLX_DM!='' }">jjcclxDm like '%${param.JJCCLX_DM }%' </c:if>
					<c:if test="${param.CCPZH!=null && param.CCPZH!='' }">and ccpzh like '%${param.CCPZH }%'</c:if>
					<c:if test="${param.CJH!=null && param.CJH!='' }">and cjh like '%${param.CJH }%' </c:if>
					<c:if test="${param.CCDJH!=null && param.CCDJH!='' }">and ccdjh=${param.CCDJH } </c:if>
					<c:if test="${param.NSRBM!=null && param.NSRBM!='' }">and nsrbm like '%${param.NSRBM }%' </c:if>
					and djztDm!='04'
				</mytag:List>
				<logic:notEmpty name="ccxxList">
					<mytag:List name="djzt" table="TDmCcsDjzt"></mytag:List>
					<mytag:List name="jjcclx" table="TDmCcsJjcclx"></mytag:List>
					<logic:iterate id="ccxx" name="ccxxList">
						<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
							<td>${ccxx.ccdjh }</td>
							<td>
								<logic:iterate id="jjcclxlist" name="jjcclx">
									<c:if test="${jjcclxlist.jjcclxDm==ccxx.jjcclxDm}">${jjcclxlist.jjcclxMc}</c:if> 
								</logic:iterate>	
							</td>
							<td>${ccxx.ccpzh }</td>
							<td>${ccxx.czMc }</td>
							<td>${ccxx.cjh }</td>
							<td>
								
								<logic:iterate id="djztlist" name="djzt">
									<c:if test="${djztlist.djztDm==ccxx.djztDm}">${djztlist.djztMc}</c:if> 
								</logic:iterate>	
							</td>
							<td>
							<script>
								var sbqsny= transfordate('${ccxx.sbqsny }');
								document.write(sbqsny);
							</script>
							</td>
							<td class="form_button">
								<!-- 向用例传入module地址和车船登记号码 -->
								<input type="button" 
									<c:if test="${param.module=='book/car_cancel_form.jsp' }">value="注销"</c:if>
									<c:if test="${param.module=='book/car_adjusttax_form.jsp' }">value="应税年月调整"</c:if>
									<c:if test="${param.module=='book/transforform.jsp' }">value="过户"</c:if>
									<c:if test="${param.module=='book/moveoutform.jsp' }">value="迁出"</c:if>
									<c:if test="${param.module=='book/insurance_orform.jsp' }">value="保险代缴"</c:if>
									<c:if test="${param.module=='book/car_register_update_form.jsp' }">value="车船修改"</c:if>
									<c:if test="${param.module=='declare/declare_check.do' }">value="车船申报"</c:if> 
									<c:if test="${param.module=='ticket/ATM_reprint.do' }">value="税票补打"</c:if> 	
									<c:if test="${param.module=='ticket/info_without_tax_form.jsp' }">value="通知单操作"</c:if>							
								onClick="location.href='${pageScope.basePath }system/${param.module}?ccdjh=${ccxx.ccdjh }'"/>
							</td>
						</tr>
					</logic:iterate>
				</logic:notEmpty>
				<logic:empty name="ccxxList">
					<tr>
						<td colspan="8">暂无记录<c:if test="${(param.CCPZH!=null && param.CCPZH!='') || (param.CJH!=null && param.CJH!='')||(param.CCDJH!=null && param.CCDJH!='')||(param.NSRBM!=null && param.NSRBM!='')}"><input name="DATACHECK" value="NONE" style="display:none"/></c:if></td>
					</tr>
				</logic:empty>
				<%--分页村签--%>
				<tr>
					<td colspan="8" class="page" style="padding-top:10px;"><mytag:page /></td>
				</tr>
			</table>
		</div>
	</div>
</div>
</body>
</html>
